<?php

class Default_Form_Login extends Zend_Form
{

    public function init()
    {
        /* Form Elements & Other Definitions Here ... */
    	$this->setName("login");
    	$this->setMethod('post');
    	
    	$usuario = new Zend_Form_Element_Text('usuario');
    	$usuario->setLabel("Usuário")
    	->setRequired(TRUE)
    	->setFilters(array("StripTags", "StringTrim"))
    	->setValidators(array("NotEmpty"));
    	
    	$senha = new Zend_Form_Element_Password('senha');
    	$senha->setLabel("Senha")
    	->setRequired(TRUE)
    	->setFilters(array("StripTags", "StringTrim"))
    	->setValidators(array("NotEmpty"));
    	$enviar = new Zend_Form_Element_Submit("submit");
    	$enviar->setIgnore(true)
    	->setLabel("Entrar")
    	->removeDecorator('HtmlTag');
    	
    	$token = new Zend_Form_Element_Hash('token');
    	$token->setSalt('s4a1t-53gur0')
    	->setTimeout(300)
    	->setIgnore(true)
    	->removeDecorator('HtmlTag')
    	->removeDecorator('Label')
    	->addErrorMessage(_('Token provided did not match, session expired. Please reload the form.'));
    	
    	$this->addElements(array($usuario, $senha, $enviar, $token));
    }


}

